# Version 0.0.1
# build
# sudo docker build -t yonh/gogs .
# run
# sudo docker run -d -p 22:22 -p 3000:3000 --name gogs  yonh/gogs

# basic image
FROM ubuntu:14.04
MAINTAINER yonh "azssjli@163.com"
ENV REFERSHED_AT 2015-06-13

ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y git openssh-server && rm -rf /var/lib/apt/lists/*

add gogs /gogs

RUN mkdir /var/run/sshd

####### start 
run  adduser yy && chown yy:yy /gogs -R
add run.sh /run.sh
run chmod 777 /run.sh

####### end 

EXPOSE 22 3000

CMD ["/run.sh"]
